1. Field of the Invention
The present invention relates to a coding method for compressing the amount of image data, the method being adopted by encoders for use with facsimile machines, image filing systems and the like.
2. Description of the Prior Art
FIG. 1 illustratively shows a coding format for image data of one page for use with facsimile machines, the format being defined by Recommendation T.4 of CCITT (International Consultative Committee for Telephone and Telegraph). In FIG. 1, reference numeral 1 is MH-coded data of one line; and 2 is an end-of-line (EOL) code attached to the end of each MH-coded line as well as to the beginning of the first line of a page. The EOL is a unique code (whose format is 000000000001) that does not appear in code words constituting each of the coded lines. Thus if there occurs a code error, resynchronizing is possible in units of lines. Reference numeral 3 in FIG. 1 is a return-to-control (RTC) code which indicates the end of a page and which is made up of six EOL's 2 connected in a row. In this specification, each line refers to a line scanned in the main scanning direction.
FIG. 2 is a flowchart showing the typical prior art steps to MH-code one page of image data on a one-dimensional basis. In step ST1, an EOL 2 is attached to a line. In step ST2, one line of image data is MH-coded. In step ST3, the above process is repeated for each of the remaining lines. When one page of image data has all been coded, the RTC 3 is attached to the page in step ST4. This completes the one-dimensional coding of one page of image data.
One disadvantage of the prior art one-dimensional coding method outlined above is that a redundant EOL 2 which is 12 bits long needs to be attached to each MH-coded line. This means that when the image data of 3.85 lines/mm in vertical resolution is coded, there occurs a redundant code portion of as many as 13,716 bits added to the data.
When coded image data passes through a transmission line of a high error rate, the receiving side effectively utilizes EOL's 2 by detecting them from erroneous data for resynchronizing purposes. But if the data moves through a transmission line of a low error rate, i.e., with few errors likely to occur, the receiving side rarely needs, if ever, to carry out resynchronizing. In that case, the EOL's 2 become redundant and the transmitted or stored data contains large quantities of redundant codes.